<html>
<head>
  <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1">
  <title>Contents.m</title>
<link rel="stylesheet" type="text/css" href="../stpr.css">
</head>
<body>
<table  border=0 width="100%" cellpadding=0 cellspacing=0><tr valign="baseline">
<td valign="baseline" class="function"><b class="function">USPS2MAT</b>
<td valign="baseline" align="right" class="function"><a href="../data/index.html" target="mdsdir"><img border = 0 src="../up.gif"></a></table>
  <p><b>converts USPS database to Matlab data file (MAT).</b></p>
  <hr>
<div class='code'><code>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Description:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;creates&nbsp;MAT-file&nbsp;containing&nbsp;training&nbsp;and&nbsp;testing&nbsp;part</span><br>
<span class=help>&nbsp;&nbsp;of&nbsp;the&nbsp;USPS&nbsp;database&nbsp;of&nbsp;handwritten&nbsp;numerals.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Input:</span></span><br>
<span class=help>&nbsp;&nbsp;It&nbsp;requires&nbsp;input&nbsp;text&nbsp;files&nbsp;"zip.test"&nbsp;and&nbsp;"zip.train"</span><br>
<span class=help>&nbsp;&nbsp;which&nbsp;can&nbsp;be&nbsp;downloaded&nbsp;from:</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;http://www-stat-class.stanford.edu/~tibs/ElemStatLearn/datasets/zip.train.gz</span><br>
<span class=help>&nbsp;&nbsp;http://www-stat-class.stanford.edu/~tibs/ElemStatLearn/datasets/zip.test.gz</span><br>
<span class=help>&nbsp;&nbsp;</span><br>
<span class=help>&nbsp;<span class=help_field>Output:</span></span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;output&nbsp;MAT-file&nbsp;"usps.mat"&nbsp;contains:&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;trn.X&nbsp;[256&nbsp;x&nbsp;7291]&nbsp;Images&nbsp;of&nbsp;training&nbsp;numerals&nbsp;stored&nbsp;as&nbsp;columns.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;trn.y&nbsp;[1&nbsp;x&nbsp;7291]&nbsp;Labels&nbsp;y==1&nbsp;--&gt;"1",&nbsp;...,&nbsp;y==9--&gt;"9",...&nbsp;y==10--&gt;"0".</span><br>
<span class=help></span><br>
<span class=help>&nbsp;&nbsp;&nbsp;tst.X&nbsp;[256&nbsp;x&nbsp;2007]&nbsp;Images&nbsp;of&nbsp;testing&nbsp;numerals&nbsp;stored&nbsp;as&nbsp;columns.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;tst.y&nbsp;[1&nbsp;x&nbsp;2007]&nbsp;Labels.</span><br>
<span class=help></span><br>
<span class=help>&nbsp;<span class=help_field>Example:</span></span><br>
<span class=help>&nbsp;&nbsp;The&nbsp;following&nbsp;code&nbsp;displays&nbsp;the&nbsp;first&nbsp;training&nbsp;image.</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;load&nbsp;usps.mat;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;img&nbsp;=&nbsp;reshape(trn.X(:,1),16,16);</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;figure;&nbsp;</span><br>
<span class=help>&nbsp;&nbsp;&nbsp;imshow(img,[]);</span><br>
<span class=help>&nbsp;</span><br>
</code></div>
  <hr>
  <b>Source:</b> <a href= "../data/list/usps2mat.html">usps2mat.m</a>
  <p><b class="info_field">About: </b>  Statistical Pattern Recognition Toolbox<br>
 (C) 1999-2003, Written by Vojtech Franc and Vaclav Hlavac<br>
 <a href="http://www.cvut.cz">Czech Technical University Prague</a><br>
 <a href="http://www.feld.cvut.cz">Faculty of Electrical Engineering</a><br>
 <a href="http://cmp.felk.cvut.cz">Center for Machine Perception</a><br>

  <p><b class="info_field">Modifications: </b> <br>
 07-jun-2004, VF<br>
 10-mar-2004, VF<br>

</body>
</html>
